efi_selftest: check for buffer overflow in efi_get_variable
authorIvan Gorinov <[email protected]>
Fri, 25 May 2018 17:45:09 +0000 (10:45 -0700)
committerAlexander Graf <[email protected]>
Sun, 3 Jun 2018 13:27:21 +0000 (15:27 +0200)
commitfe5bc23f43341d19528b15aaf6e09f56975e1316
tree3bff70d6926cd7081902ff8eb54d77720fbe4be3
parent7f474ef6cc3565bb3538b7004a50fd79280ae105
efi_selftest: check for buffer overflow in efi_get_variable

Allocate a buffer on the stack instead of an array of uninitialized
pointers; check if GetVariable writes past the end of the buffer.

Signed-off-by: Ivan Gorinov <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
lib/efi_selftest/efi_selftest_variables.c